﻿using UnityEngine;

namespace ProjectDanmaku.Core
{
    public class LevelManager : MonoBehaviour
    {
        private GameObject _currentLevel;

        public void EnterLevel(GameObject levelPrefab)
        {
            if (_currentLevel != null)
                Destroy(_currentLevel.gameObject);
            
            _currentLevel = Instantiate(levelPrefab, transform);
        }
    }
}